{% extends "./layout/layout.html" %}
{% block title %}
<title>视频中心</title>
{% endblock %}

{% block content %}
<!-- banner -->
<div class="banner">
  <img src="http://fpiwebsite.oss-cn-hangzhou.aliyuncs.com/upload2020/20210730153301_2021.jpg" alt="聚光" class="pimg">
  <img src="http://fpiwebsite.oss-cn-hangzhou.aliyuncs.com/upload2020/20210730153310_6161.jpg" alt="聚光" class="mimg">
  <div class="txt">
    <div class="box  wow fadeInUp">
      <div class="btt f_30">新闻热点</div>
      <div class="en f_16">News </div>
      <div class="xian"></div>
      <div class="btc f_18">
        为您提供最新最及时的聚光科技资讯以及行情动态
      </div>

    </div>
  </div>
</div>

<!-- 内容 -->
<div class="a_dw" id="d1"></div>
<div class="new1 new4">
  <div class="box">
    <div class="nday clearfix  alltime wow fadeInUp">
      <div class="nlt clearfix">
        <div class="sx clearfix">
          <span class="" data-days="30">近30天</span>
          <span class="" data-days="90">近90天</span>
          <span class="" data-days="365">近1年</span>
          <span class="act" data-days="0">全部</span>
        </div>
      </div>

      <div class="nrt clearfix">
        <input type="text" id="pageKeywords" placeholder="请输入关键字...">
        <a onclick="location='search_el.html?key='+document.getElementById('pageKeywords').value"></a>
      </div>
    </div>
    <div class="nbtn clearfix f_16 wow fadeInUp">
      <a href="news.html#d1"><span>-</span> 聚光速递 <span>-</span></a>
      <a href="character.html#d1"><span>-</span> 人物专访 <span>-</span></a>
      <a href="news2.html#d1"><span>-</span> 媒体报道 <span>-</span></a>
      <a href="special.html#d1"><span>-</span> 热点专题 <span>-</span></a>
      <a href="electron.html#d1" class="act"><span>-</span> 视频中心 <span>-</span></a>

    </div>
    <ul class="ul1 ule clearfix alltime wow fadeInUp dataul">

      <li class="Video" data-src="http://fpiwebsite.oss-cn-hangzhou.aliyuncs.com/upload2020/20220415210554_1251.mp4"
        id="9991">
        <a target="_blank" title="热烈庆祝聚光科技上市11周年，亮点产品集锦">

          <div class="img">
            <img src="http://fpiwebsite.oss-cn-hangzhou.aliyuncs.com/upload2020/20220415211342_3751.png" alt="聚光">
          </div>
          <div class="txt">
            <div class="ltt ">热烈庆祝聚光科技上市11周年，亮点产品集锦</div>
            <div class="ltc2 "></div>
            <div class="day ">2022-04-15</div>
          </div>
        </a>
      </li>

      <li class="Video" data-src="http://fpiwebsite.oss-cn-hangzhou.aliyuncs.com/upload2020/20211228134457_8666.mp4"
        id="9661">
        <a target="_blank" title="聚光科技品牌系列影片之生命科学守护幸福安康">

          <div class="img">
            <img src="http://fpiwebsite.oss-cn-hangzhou.aliyuncs.com/upload2020/20211228134426_2992.jpg" alt="聚光">
          </div>
          <div class="txt">
            <div class="ltt ">聚光科技品牌系列影片之生命科学守护幸福安康</div>
            <div class="ltc2 "></div>
            <div class="day ">2021-12-28</div>
          </div>
        </a>
      </li>

      <li class="Video" data-src="http://fpiwebsite.oss-cn-hangzhou.aliyuncs.com/upload2020/20211228133840_8482.mp4"
        id="9660">
        <a target="_blank" title="聚光科技品牌系列影片之智慧实验室探索物质奥秘">

          <div class="img">
            <img src="http://fpiwebsite.oss-cn-hangzhou.aliyuncs.com/upload2020/20211228133802_6140.jpg" alt="聚光">
          </div>
          <div class="txt">
            <div class="ltt ">聚光科技品牌系列影片之智慧实验室探索物质奥秘</div>
            <div class="ltc2 "></div>
            <div class="day ">2021-12-28</div>
          </div>
        </a>
      </li>

      <li class="Video" data-src="http://fpiwebsite.oss-cn-hangzhou.aliyuncs.com/upload2020/20211228132519_6291.mp4"
        id="9659">
        <a target="_blank" title="聚光科技品牌系列影片之智慧环境守护绿水青山">

          <div class="img">
            <img src="http://fpiwebsite.oss-cn-hangzhou.aliyuncs.com/upload2020/20211228161748_9798.jpg" alt="聚光">
          </div>
          <div class="txt">
            <div class="ltt ">聚光科技品牌系列影片之智慧环境守护绿水青山</div>
            <div class="ltc2 "></div>
            <div class="day ">2021-12-28</div>
          </div>
        </a>
      </li>

      <li class="Video" data-src="http://fpiwebsite.oss-cn-hangzhou.aliyuncs.com/upload2020/20211228131153_9333.mp4"
        id="9658">
        <a target="_blank" title="聚光科技品牌系列影片之智慧工业感知生产过程">

          <div class="img">
            <img src="http://fpiwebsite.oss-cn-hangzhou.aliyuncs.com/upload2020/20211228131022_9193.jpg" alt="聚光">
          </div>
          <div class="txt">
            <div class="ltt ">聚光科技品牌系列影片之智慧工业感知生产过程</div>
            <div class="ltc2 "></div>
            <div class="day ">2021-12-28</div>
          </div>
        </a>
      </li>

      <li class="Video" data-src="http://fpiwebsite.oss-cn-hangzhou.aliyuncs.com/upload2020/20211228125356_7901.mp4"
        id="9657">
        <a target="_blank" title="聚光科技集团品牌形象影片">

          <div class="img">
            <img src="http://fpiwebsite.oss-cn-hangzhou.aliyuncs.com/upload2020/20211228164626_3522.png" alt="聚光">
          </div>
          <div class="txt">
            <div class="ltt ">聚光科技集团品牌形象影片</div>
            <div class="ltc2 "></div>
            <div class="day ">2021-12-28</div>
          </div>
        </a>
      </li>

      <li class="Video" data-src="http://fpiwebsite.oss-cn-hangzhou.aliyuncs.com/upload2020/20220210153306_7272.mp4"
        id="9743">
        <a target="_blank" title="聚光科技20周年特辑 | 《唱响2022，跨越再出发》">

          <div class="img">
            <img src="http://fpiwebsite.oss-cn-hangzhou.aliyuncs.com/upload2020/20220210153251_0241.png" alt="聚光">
          </div>
          <div class="txt">
            <div class="ltt ">聚光科技20周年特辑 | 《唱响2022，跨越再出发》</div>
            <div class="ltc2 "></div>
            <div class="day ">2022-02-10</div>
          </div>
        </a>
      </li>

      <li class="Video" data-src="http://fpiwebsite.oss-cn-hangzhou.aliyuncs.com/upload2020/20220210153011_5085.mp4"
        id="9742">
        <a target="_blank" title="聚光科技20周年特辑 | 《聚光2022，我的20》">

          <div class="img">
            <img src="http://fpiwebsite.oss-cn-hangzhou.aliyuncs.com/upload2020/20220210152937_7116.png" alt="聚光">
          </div>
          <div class="txt">
            <div class="ltt ">聚光科技20周年特辑 | 《聚光2022，我的20》</div>
            <div class="ltc2 "></div>
            <div class="day ">2022-02-10</div>
          </div>
        </a>
      </li>

      <li class="Video" data-src="http://fpiwebsite.oss-cn-hangzhou.aliyuncs.com/upload2020/20220210152536_4147.mp4"
        id="9741">
        <a target="_blank" title="聚光科技20周年特辑 | 《每一步都有你》">

          <div class="img">
            <img src="http://fpiwebsite.oss-cn-hangzhou.aliyuncs.com/upload2020/20220210152520_5240.png" alt="聚光">
          </div>
          <div class="txt">
            <div class="ltt ">聚光科技20周年特辑 | 《每一步都有你》</div>
            <div class="ltc2 "></div>
            <div class="day ">2022-02-10</div>
          </div>
        </a>
      </li>

    </ul>
    <div class="page wow fadeInUp">
      <div class="page1 clearfix"><span><a href="electron_1.html?days=0#d1"><img src="images/zuo1.png"><img
              src="images/zuo1_h.png"></a></span><span><a><img src="/images/zuo2.png"><img
              src="/images/zuo2_h.png"></a></span><span class="current"><a>1</a></span><span><a
            href="electron_2.html?days=0#d1">2</a></span><span><a href="electron_3.html?days=0#d1">3</a></span><span><a
            href="electron_4.html?days=0#d1">4</a></span><span><a
            href="electron_5.html?days=0#d1">5</a></span><span>…</span><span><a href="electron_2.html?days=0#d1"><img
              src="images/you1.png"><img src="images/you1_h.png"></a></span>
        <span><a href="electron_6.html?days=0#d1"><img src="images/you2.png"><img
              src="images/you2_h.png"></a></span><span><input maxLength="10" size="4" value="1" id="page_go"
            name="page_go"></span>
        <script>
          function goto() {
            location = "electron_" + document.getElementById("page_go").value + ".html?days=0#d1";
          }
        </script><span><a onclick="goto()"><img src="images/you3.png"><img src="images/you3_h.png"></a></span>
      </div>
      <a id="more" class="page2 ">加载更多
      </a>
    </div>
  </div>
</div>

<!-- 弹窗 -->
<div id="z_tanchuang" class="z_tanchuang">
  <div class="tbox">
    <div class="modal">
      <div class="out alltime"></div>
      <div class="img">
        <video src="" controls></video>
      </div>
    </div>
  </div>
</div>
{% endblock %}

{% block script %}
<script>
  $(function () {
    var days = 0;
    $('.head .abtn .yjdh a').eq(5).addClass('act');
    $(".new1 .nday .sx span").on('click', function () {
      $(this).stop(true, false).addClass('act').siblings().stop(true, false).removeClass('act');
      days = $(this).data("days");
      location.href = 'electron.html?days=' + days + "#d1";
    });
    var curpage = 1;
    var pagecount = 6;

    $("#more").click(function () {
      curpage++;
      loadingList(1);
    })



    $(".new1 .ul1 li.Video").on('click', function () {
      $('.z_tanchuang').removeClass('out').addClass('one');
      $('html').addClass('act');
      var src = $(this).attr('data-src');
      var id = $(this).attr('id');
      console.log(id);
      var formdata = new FormData();
      formdata.append("id", id)
      formdata.append("action", "AddViewnum")
      $.ajax({
        url: '/ajax/ajaxup.ashx',
        type: 'post',
        data: formdata,
        async: false,
        contentType: false,
        processData: false,
        success: function (res) {
          res = JSON.parse(res);
          console.log(res.Msg);
        },
        error: function (err) {
          console.log(err)
        }
      });
      $(".z_tanchuang video").attr({
        src: src
      }).trigger('play');

    });

    function loadingList(type) {

      $.ajax({
        url: '/Ajax/Handler.ashx',
        type: 'post',
        dataType: "json",
        data: {
          'type': 'GetNewsList2',
          'classId': '51',
          'pagesize': '9',
          'days': days,
          'page': curpage
        },
        success: function (data) {
          dataList = data;
          var html = "";
          for (var i = 0; i < dataList.length; i++) {
            if (i >= dataList.length) {
              break;
            }
            html += '<li>';
            html += '<a href="' + dataList[i].note1 + '" target="_blank"  title="' + dataList[i].Title + '">';
            html += '<div class="img">';
            html += '<img src="' + dataList[i].ImgUrl + '" alt="聚光">';
            html += '</div>';
            html += '<div class="txt">';
            html += '<div class="ltt ">' + dataList[i].Title + '</div>';
            html += '<div class="day ">' + getFDate(dataList[i].ShowDate) + '</div>';
            html += '</div>';
            html += '</a>';
            html += '</li>';
          }
          if (type == 1) {
            $(".dataul").append(html);
            if (curpage >= pagecount) {
              $("#more").remove();
            }
          } else {
            $(".dataul").html(html);
          }
        },
        error: function (err) {
          console.log(err)
        }
      });

    }

    function getFDate(date) {
      var d = eval('new ' + date.substr(1, date.length - 2));

      var ar_date = [d.getFullYear(), d.getMonth() + 1, d.getDate()];

      for (var i = 0; i < ar_date.length; i++) ar_date[i] = dFormat(ar_date[i]);
      return ar_date.join('-');
    }

    function dFormat(i) {
      return i < 10 ? "0" + i.toString() : i;
    }

    function Replacestring(string) {
      if (string) {
        return string.replace(/\r\n/g, "</br>");
      } else {
        return "";
      }
    }
  })
  $("#pageKeywords").bind('keypress', function (event) {
    if (event.keyCode == 13) {
      location = "search_el.html?key=" + $(this).val();
      return false;
    }
  });
</script>
{% endblock %}